import { Includes } from "../00898-easy-includes/template";
// import { Equal } from '@type-challenges/utils';

// type Includes<T extends readonly any[], U> = T extends [
//   infer First,
//   ...infer Rest
// ]
//   ? Equal<First, U> extends true
//     ? true
//     : Includes<Rest, U>
//   : false;

export type Unique<T, Result extends any[] = []> = T extends [
  infer F,
  ...infer Rest
]
  ? Includes<Result, F> extends true
    ? Unique<Rest, Result>
    : Unique<Rest, [...Result, F]>
  : Result;

type sddf = Unique<[string, number, 1, "a", 1, string, 2, "b", 2, number]>;
